package com.common.springbootcommonmessage.mapper;

import com.common.springbootcommonmessage.model.CommonAutopartNotificationitem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommonAutopartNotificationitemMapper {
    int deleteByPrimaryKey(Integer ID);

    int insert(CommonAutopartNotificationitem record);

    int insertSelective(CommonAutopartNotificationitem record);

    CommonAutopartNotificationitem selectByPrimaryKey(Integer ID);

    int updateByPrimaryKeySelective(CommonAutopartNotificationitem record);

    int updateByPrimaryKey(CommonAutopartNotificationitem record);

    CommonAutopartNotificationitem findFirstByNotificationIDAndEventNo(@Param("notificationId") Integer notificationId, @Param("eventNo") Integer eventNo);

    Integer updateOrderItemHistoryID(@Param("notificationItemId") Integer notificationItemId, @Param("orderItemHistoryID") Integer orderItemHistoryID);

    Integer updateReadAndOperator(@Param("notificationItemId") Integer notificationItemId,@Param("read") Boolean read, @Param("OperatorID") Integer OperatorID, @Param("operatorName") String operatorName);

    List<CommonAutopartNotificationitem> findAllNoReadByNotificationIDAndOperatorType(@Param("notificationId") Integer notificationId, @Param("operatorType") Integer operatorType);
}